<!DOCTYPE html>
<html>

<head>
  <title>布局实现</title>
  <style>
    html,
    body,
    p {
      margin: 0;
      padding: 0;
    }
  </style>
</head>

<body>
  <style>
    .col1-layout {
      margin-left: auto;
      margin-right: auto;
      max-width: 500px;
    }
  </style>
  <div class="col1-layout" style="background-color:red;height:100px;">
    单列布局1
  </div>
</body>

</html>